package tgc.edu.exam.web.controller;

import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import tgc.edu.exam.custom.CommonController;
import tgc.edu.exam.custom.DataGridParam;
import tgc.edu.exam.custom.DataGridUtils;
import tgc.edu.exam.custom.LayUiResult;
import tgc.edu.exam.entity.Management;
import tgc.edu.exam.service.ManagementService;
import tgc.edu.exam.service.StudentService;
import tgc.edu.exam.service.TbClassService;
import tgc.edu.exam.web.form.ManagementForm;

@Controller
@RequestMapping(value="/management")
public class ManagementController extends CommonController<Management, UUID, ManagementForm> {

	@Autowired
	private TbClassService tcService;
	@Autowired
	private StudentService studentService;
	
	@Override
	public void edit(ManagementForm form, ModelMap map) throws InstantiationException, IllegalAccessException {
		map.put("tbClass", tcService.findAll());
		map.put("student", studentService.findAll());
		super.edit(form, map);
	}
	
}
